/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/idenger">idenger</a> All rights reserved.
 */
package com.idenger.modules.edu.entity.enroll;

import java.util.Date;
import java.util.List;

import com.idenger.common.persistence.DataEntity;
import com.idenger.common.utils.excel.annotation.ExcelField;
import com.idenger.modules.edu.entity.course.EduCourse;
import org.hibernate.validator.constraints.Length;

/**
 * 报名记录Entity
 * @author 兰正军
 * @version 2017-12-12
 */
public class EduEnroll extends DataEntity<EduEnroll> {
	
	private static final long serialVersionUID = 1L;
	private String userid;		// 用户id
	private String curriculumId;		// 课程id
	private String orderId;		// 订单id
	//private String curriculumName;		// 课程姓名
	private String status;		// 状态 0未结课 1 结课 2 过期
	private String projectId;		// 项目id
	//private String projectName;		// 项目名称
	private String bindStatus;		// 绑定状态
	
	private Date startDate;//查詢條件
	private Date endDate;
	
	
	//项目
	private String name;		// 项目名字
	private String iconImage;		// 项目封面
	private String projectIntroduce;		// 项目介绍
	private String projectType;		// 项目类型
	private String projectPrice;		// 项目价格
	private String preferentialPrice;		// 优惠价
	private List<EduCourse> courseList;//课程列表
	
	private String startPeriod;		// 学时
	private String score;		// 学分
	private Date studyBeginTime;		// 学习时间
	private Date studyEndTime;		// 学习时间
	
	//课程
	private String courseType;		// 课程类型
	private String price;		// 价格
	
	//用户
	private String realName;//真实姓名
	private String idCard;		//身份证
	private String phone;		//手机号
	private String endClassStatus;		//结课状态
	
	public EduEnroll() {
		super();
	}

	public EduEnroll(String id){
		super(id);
	}

	@Length(min=0, max=64, message="用户id长度必须介于 0 和 64 之间")
	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}
	
	@Length(min=0, max=64, message="课程id长度必须介于 0 和 64 之间")
	public String getCurriculumId() {
		return curriculumId;
	}

	public void setCurriculumId(String curriculumId) {
		this.curriculumId = curriculumId;
	}
	
	@Length(min=0, max=64, message="订单id长度必须介于 0 和 64 之间")
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}
	
/*	@Length(min=0, max=512, message="课程姓名长度必须介于 0 和 512 之间")
	public String getCurriculumName() {
		return curriculumName;
	}

	public void setCurriculumName(String curriculumName) {
		this.curriculumName = curriculumName;
	}*/
	
	@Length(min=0, max=10, message="状态长度必须介于 0 和 10 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@Length(min=0, max=64, message="项目id长度必须介于 0 和 64 之间")
	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}
	
	/*@Length(min=0, max=64, message="项目名称长度必须介于 0 和 64 之间")
	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}*/
	
	@Length(min=0, max=64, message="绑定状态长度必须介于 0 和 64 之间")
	public String getBindStatus() {
		return bindStatus;
	}

	public void setBindStatus(String bindStatus) {
		this.bindStatus = bindStatus;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIconImage() {
		return iconImage;
	}

	public void setIconImage(String iconImage) {
		this.iconImage = iconImage;
	}

	public String getProjectIntroduce() {
		return projectIntroduce;
	}

	public void setProjectIntroduce(String projectIntroduce) {
		this.projectIntroduce = projectIntroduce;
	}

	public String getProjectType() {
		return projectType;
	}

	public void setProjectType(String projectType) {
		this.projectType = projectType;
	}

	public String getProjectPrice() {
		return projectPrice;
	}

	public void setProjectPrice(String projectPrice) {
		this.projectPrice = projectPrice;
	}

	public String getPreferentialPrice() {
		return preferentialPrice;
	}

	public void setPreferentialPrice(String preferentialPrice) {
		this.preferentialPrice = preferentialPrice;
	}

	public String getCourseType() {
		return courseType;
	}

	public void setCourseType(String courseType) {
		this.courseType = courseType;
	}

	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public List<EduCourse> getCourseList() {
		return courseList;
	}

	public void setCourseList(List<EduCourse> courseList) {
		this.courseList = courseList;
	}
    @ExcelField(title="姓名", align=2, sort=10)
	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}
	
    @ExcelField(title="身份证号", align=2, sort=20)  
	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}
    @ExcelField(title="手机号", align=2, sort=30)  
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
    @ExcelField(title="是否结课", align=2, sort=40)  
	public String getEndClassStatus() {
		if("1".equals(endClassStatus)){
			endClassStatus = "已结课";
		}
		if("0".equals(endClassStatus)){
			endClassStatus = "未结课";
		}
		if("2".equals(endClassStatus)){
			endClassStatus = "已过期";
		}
		if("3".equals(endClassStatus)){
			endClassStatus = "可以结课";
		}
		return endClassStatus;
	}

	public void setEndClassStatus(String endClassStatus) {
		this.endClassStatus = endClassStatus;
	}

	public String getStartPeriod() {
		return startPeriod;
	}

	public void setStartPeriod(String startPeriod) {
		this.startPeriod = startPeriod;
	}

	public String getScore() {
		return score;
	}

	public void setScore(String score) {
		this.score = score;
	}

	public Date getStudyBeginTime() {
		return studyBeginTime;
	}

	public void setStudyBeginTime(Date studyBeginTime) {
		this.studyBeginTime = studyBeginTime;
	}

	public Date getStudyEndTime() {
		return studyEndTime;
	}

	public void setStudyEndTime(Date studyEndTime) {
		this.studyEndTime = studyEndTime;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	
	
}